package com.cnap.db.entity;

import java.util.Objects;

/**
 * 进度实体类
 *
 * @author xc
 **/
public class ProgressPO {
    // id
    private String id;
    /**
     * 阶段：上传，合并，解压（包含解析），推送
     */
    private String stage;
    // 百分比
    private int percent;
    // 类型
    private String type;
    // 异常
    private String exception;

    /**
     * get
     *
     * @return Id
     */
    public String getId() {
        return id;
    }

    /**
     * set
     *
     * @param id id
     */
    public void setId(String id) {
        this.id = id;
    }

    /**
     * get
     *
     * @return Stage
     */
    public String getStage() {
        return stage;
    }

    /**
     * set
     *
     * @param stage stage
     */
    public void setStage(String stage) {
        this.stage = stage;
    }

    /**
     * get
     *
     * @return Percent
     */
    public int getPercent() {
        return percent;
    }

    /**
     * set
     *
     * @param percent percent
     */
    public void setPercent(int percent) {
        this.percent = percent;
    }

    /**
     * get
     *
     * @return Type
     */
    public String getType() {
        return type;
    }

    /**
     * set
     *
     * @param type type
     */
    public void setType(String type) {
        this.type = type;
    }

    /**
     * get
     *
     * @return Exception
     */
    public String getException() {
        return exception;
    }

    /**
     * set
     *
     * @param exception exception
     */
    public void setException(String exception) {
        this.exception = exception;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        ProgressPO that = (ProgressPO) o;
        return percent == that.percent && Objects.equals(id, that.id) && Objects.equals(stage, that.stage) && Objects.equals(exception, that.exception);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, stage, percent, exception);
    }

    @Override
    public String toString() {
        return "ProgressPO{" +
                "id='" + id + '\'' +
                ", stage='" + stage + '\'' +
                ", percent=" + percent +
                ", exception='" + exception + '\'' +
                '}';
    }
}
